home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DDJMAG
/
DDJ9203.ZIP
/
OOPASM.ZIP
/
MACROS.HLP
< prev
next >
Wrap
Text File
|
1990-12-14
|
9KB
|
498 lines
Name: defDispTbl
File: macros.mac
Description:
Defines a dispatch table consisting of keyboard and mouse event descriptions,
and object/message pairs to be sent when event occurs. This table is labeled
with the object name concatenated with "DispTbl" (e.g. VertMenuDispTbl).
Syntax:
defDispTbl object,\
<acode,scode,state,ur,lc,lr,rc,obj,msg[,obj,msg...]>
Field Meanings:
object defining object name
acode ASCII code of keyboard event
scode scan code of keyboard event
state button state (Nil = Don't care, 0 = Button released,
1 = Button pressed),
ur upper row of valid mouse region
lc left column
lr lower row
rc right column
obj object to get message when event occurs
msg message to pass to object when event occurs
Example:
defDispTbl VertMenu,\
<0,0,3,0,0,0,0,System,Reset>,\
<13,28,0,MR,LC,LR,LC+8,Self,Select>,\
<0,68,3,0,0,0,0,Self,Clear,System,Refresh,System,Read>,\
<27,1,0,0,0,24,79,Self,Clear>,\
<0,Nil,1,0,0,24,79,Self,DeHilite>,\
<Nil,Nil,Nil,0,0,24,79,Hardware,Refresh>
=============================================================================
=============================================================================
Name: defMenu
File: macros.mac
Description:
Defines a menu consisting of zero terminated ASCII strings. This menu is
labeled with the object name concatenated with "Menu" (e.g. DialogMenu).
Syntax:
defMenu object,\
<'string[,'string'...]>
Field Meanings:
object defining object name
string ASCII string for menu item
Example:
defMenu Dialog,\
<'Ok','Cancel','Help'>
=============================================================================
=============================================================================
Name: defMenuTbl
File: macros.mac
Description:
Defines a menu dispatch table consisting of object/message pairs
cooresponding to menu items defined with the defMenu macro. This table is
labeled with the object name concatenated with "MenuTbl" (e.g.
DialogMenuTbl).
Syntax:
defMenuTbl object,\
<obj,msg[,obj,msg...]>
Field Meanings:
object defining object name
obj object to get message when menu item selected
msg message to pass to object when menu item selected
Example:
defMenuTbl Dialog,\
<SomeObj,Activate>,\
<Self,Clear>,\
<Help,Refresh>
=============================================================================
=============================================================================
Name: defMsg
File: objects.mac
Description:
Defines a message consisting of a _Message structure of three method pointers
cooresponding to the Before, Primary, and After methods. This structure is
labeled with the object name concatenated with the message name (e.g.
ScreenRefresh).
Syntax:
defMsg object,\
message,\
<[before],[primary],[after]>
Field Meanings:
object defining object name
message message being defined
before Before method (procedure) name
primary Primary method name
after After method name
Example:
defMsg Screen,\
Refresh,\
<,drawBackDrop,drawLabel>
=============================================================================
=============================================================================
Name: defObj
File: objects.mac
Description:
Defines an object consisting of an ject structure of three pointers to
an ancestor table, instance variable table, and a message table. This
structure is labeled with the object name.
Syntax:
defObj object,\
<[obj1[,obj2...]]>,\
<[inst1,size1,value1[,inst2,size2,value2...]]>,\
<msg1[,msg2...]>
Field Meanings:
object name of object being defined
obj ancestral object name
inst instance variable name
size instance variable size
value instance variable initial value
msg message name object will respond to
Example:
defObj File,\
<MemMngr>,\
<MemSize,2,80h,\
MemSeg,2,Nil,\
FileHdl,2,Nil,\
BytesRead,2,Nil>,\
<Open,Read,Init>
=============================================================================
=============================================================================
Name: getInst
File: objects.mac
Description:
Gets the value of an instance variable.
Syntax:
getInst reg,inst[,obj]
Field Meanings:
reg destination register
inst instance variable name
obj source object (it is assumed that the SI register
contains the source object address if not specified)
Example:
getInst bx,InxPtr,Self ;Get Self's index pointer
getInst si,TextPtr ;And its text pointer
=============================================================================
=============================================================================
Name: getInst$
File: objects.mac
Description:
Gets the value of an instance variable when the source object is pointed to
by a Self instance variable.
Syntax:
getInst$ reg,inst[,obj-inst]
Field Meanings:
reg destination register
inst instance variable name
obj-inst source object instance variable
Example:
getInst$ dh,Row1,MasterObj ;Get master's upper row
getInst dl,Col1 ;And left column
=============================================================================
=============================================================================
Name: getStackArgs
File: macros.mac
Description:
Gets method arguments off the stack and places them in the specified
registers.
Syntax:
getStackArgs <reg[,reg...]>
Field Meanings:
reg destination register
Example:
getStackArgs <ax,bx,cx> ;Get top 3 stack items
=============================================================================
=============================================================================
Name: initObj
File: objects.mac
Description:
Initializes an object. Only those objects passed messages by the send or
sendLoop macro need to be initialized.
Syntax:
initObj object
Field Meanings:
object name of object to be in initialized
Example:
initObj VertMenu ;Must be initialized before
; any of its ancestors
initObj Menu
=============================================================================
=============================================================================
Name: send
File: objects.mac
Description:
Sends a message to an object. Object must first be initialized with the
initObj macro.
Syntax:
send object,message[,<arg1[,arg2...]>]
Field Meanings:
object name of object to sent message
message name of message sent to object
arg optional message argument (retreived with the
getStackArgs macro and changed with setStackArgs)
Example:
send Screen,Refresh ;Send Screen a Refresh msg
send MenuBar,Hilite,ax ;Hilite AXth menu item
=============================================================================
=============================================================================
Name: setInst
File: objects.mac
Description:
Sets the value of an instance variable.
Syntax:
setInst inst,source[,[obj],size]
Field Meanings:
inst instance variable name
source source register or memory location
obj source object (it is assumed that the SI register
contains the source object address if not specified)
size size of data item (only needed if source is memory)
Example:
setInst TextPtr,si,Self ;Set Self's text pointer
setInst InxPtr,Nil,,2 ;And index pointer
=============================================================================
=============================================================================
Name: setInst$
File: objects.mac
Description:
Sets the value of an instance variable when the source object is pointed to
by a Self instance variable.
Syntax:
setInst$ inst,source[,[obj-inst],size]
Field Meanings:
inst instance variable name
source source register or memory location
obj-inst source object instance variable
size size of data item (only needed if source is memory)
Example:
setInst$ TextPtr,si,MasterObj ;Set master's text pointer
setInst InxPtr,Nil,,2 ;And index pointer
=============================================================================
=============================================================================
Name: setStackArgs
File: macros.mac
Description:
Sets method stack arguments with the specified register values.
Syntax:
setStackArgs <reg[,reg...]>
Field Meanings:
reg source register
Example:
getStackArgs <ax,bx> ;Get top 2 stack items
inc ax
xor bx,bx
setStackArgs <ax,bx> ;Now change those values